#pragma once
#include "Actor.h"
namespace mini
{
	enum class shadowType
	{
		Shadowmap = 0,
		unknown = 0xFFFF
	};

	class CShadow : public CActor 
	{
	public:
		CShadow();
		virtual ~CShadow();	
		shadowType getType() const;
		void setShader(const std::string& szName);
		void setLight(CLightActor* pLight);
		virtual int nPassCount();
		virtual CShaderUnit* passBegin(DeviceContext* pContext, int nNumber);
		virtual void passEnd(DeviceContext* pContext, int nNumber);
		virtual void updateMeshMatrix(CShaderUnit* pShaderUnit, CMatrix* pMatrix);

	protected:
		shadowType mType = shadowType::unknown;
		CMaterialUnit* mpMaterialUnit = nullptr;
		CLightActor* mpLightActor = nullptr;
	};
}